<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/


Route::any('/', function () {
    return response()->json(success());
});
Route::any('/getcode/{key}', 'WechatController@getcode');
Route::any('/getopenid/{key}', 'WechatController@getopenid');

Route::any('/share/getcode', 'WechatController@getcodeShare');
Route::any('/share/getopenid', 'WechatController@getopenidShare');


Route::any('/posting', function () {
    return view('share');
});
Route::any('/pay', 'PayController@pay');
Route::any('/check', 'PayController@checkStatus');
Route::any('/paySuccess', 'PayController@paySuccess');

Route::any('/community/{a}', function () {
    return view('index');
});

//中秋节活动
Route::get('/game', function () {
    return view('midautumn2018');
});
Route::get('/rotate', function () {
    return view('rotate');
});

Route::get('/hashid', function () {
    dd(hashid_encode(1));
});


Route::any('/hashdecode', function () {
    dd(hashid_decode('VolejRejNm'));
});

Route::any('/test', function () {
    dd(sha1('jsapi_ticket=HoagFKDcsGMVCIY2vOjf9q88BaYVKYs_bcz3_O56hjXsLbfNuiIMRYhWRVAmTTPsl8pcxnChMOjYfRGTnPbF1g&noncestr=c3RI8SkEzVDQp5lG&timestamp=1550295368&url=https:\/\/wechatlt.jkbanlv.com\/'));
});